public class Test6 {
    public static void main(String[] args) {
        int[] arr = {1,2,2,4,4,6,3};
        int flag = -1;
        for (int i = 0; i < arr.length; i++) {
            flag = 1;
            for (int j = 0; j < arr.length; j++) {
                if(arr[i] == arr[j] && (i != j)) {
                    flag = -1;
                    break;
                }
            }
            if(1 == flag) {
                System.out.println("只出现一次数为:" + arr[i]);

            }

        }
    }
}
